package org.lee.myshiroredisplus.util;

/**
 * @author jackielee
 * @version 1.0
 * @description TryDo
 * @date 2021/4/9
 **/
public class TryDo {

    public static <T> T doing(Action<T> action){
        try {
            return action.doing();
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }

    public interface Action<T>{
        T doing();
    }
}
